3.2113 \(\int \frac{\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx\)

Optimal. Leaf size=131 \[ \frac{x \left (-2 c e (2 b d-a e)+b^2 e^2+3 c^2 d^2\right )}{e^4}-\frac{\left (a e^2-b d e+c d^2\right )^2}{e^5 (d+e x)}-\frac{2 (2 c d-b e) \log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^5}-\frac{c x^2 (c d-b e)}{e^3}+\frac{c^2 x^3}{3 e^2} \]

[Out]

((3*c^2*d^2 + b^2*e^2 - 2*c*e*(2*b*d - a*e))*x)/e^4 - (c*(c*d - b*e)*x^2)/e^3 +
(c^2*x^3)/(3*e^2) - (c*d^2 - b*d*e + a*e^2)^2/(e^5*(d + e*x)) - (2*(2*c*d - b*e)
*(c*d^2 - b*d*e + a*e^2)*Log[d + e*x])/e^5

_______________________________________________________________________________________

Rubi [A]  time = 0.351437, antiderivative size = 131, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05 \[ \frac{x \left (-2 c e (2 b d-a e)+b^2 e^2+3 c^2 d^2\right )}{e^4}-\frac{\left (a e^2-b d e+c d^2\right )^2}{e^5 (d+e x)}-\frac{2 (2 c d-b e) \log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^5}-\frac{c x^2 (c d-b e)}{e^3}+\frac{c^2 x^3}{3 e^2} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x + c*x^2)^2/(d + e*x)^2,x]

[Out]

((3*c^2*d^2 + b^2*e^2 - 2*c*e*(2*b*d - a*e))*x)/e^4 - (c*(c*d - b*e)*x^2)/e^3 +
(c^2*x^3)/(3*e^2) - (c*d^2 - b*d*e + a*e^2)^2/(e^5*(d + e*x)) - (2*(2*c*d - b*e)
*(c*d^2 - b*d*e + a*e^2)*Log[d + e*x])/e^5

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{c^{2} x^{3}}{3 e^{2}} + \frac{2 c \left (b e - c d\right ) \int x\, dx}{e^{3}} + \left (2 a c e^{2} + b^{2} e^{2} - 4 b c d e + 3 c^{2} d^{2}\right ) \int \frac{1}{e^{4}}\, dx + \frac{2 \left (b e - 2 c d\right ) \left (a e^{2} - b d e + c d^{2}\right ) \log{\left (d + e x \right )}}{e^{5}} - \frac{\left (a e^{2} - b d e + c d^{2}\right )^{2}}{e^{5} \left (d + e x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c*x**2+b*x+a)**2/(e*x+d)**2,x)

[Out]

c**2*x**3/(3*e**2) + 2*c*(b*e - c*d)*Integral(x, x)/e**3 + (2*a*c*e**2 + b**2*e*
*2 - 4*b*c*d*e + 3*c**2*d**2)*Integral(e**(-4), x) + 2*(b*e - 2*c*d)*(a*e**2 - b
*d*e + c*d**2)*log(d + e*x)/e**5 - (a*e**2 - b*d*e + c*d**2)**2/(e**5*(d + e*x))

_______________________________________________________________________________________

Mathematica [A]  time = 0.242201, size = 127, normalized size = 0.97 \[ \frac{3 e x \left (2 c e (a e-2 b d)+b^2 e^2+3 c^2 d^2\right )-\frac{3 \left (e (a e-b d)+c d^2\right )^2}{d+e x}-6 (2 c d-b e) \log (d+e x) \left (e (a e-b d)+c d^2\right )+3 c e^2 x^2 (b e-c d)+c^2 e^3 x^3}{3 e^5} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x + c*x^2)^2/(d + e*x)^2,x]

[Out]

(3*e*(3*c^2*d^2 + b^2*e^2 + 2*c*e*(-2*b*d + a*e))*x + 3*c*e^2*(-(c*d) + b*e)*x^2
 + c^2*e^3*x^3 - (3*(c*d^2 + e*(-(b*d) + a*e))^2)/(d + e*x) - 6*(2*c*d - b*e)*(c
*d^2 + e*(-(b*d) + a*e))*Log[d + e*x])/(3*e^5)

_______________________________________________________________________________________

Maple [A]  time = 0.012, size = 246, normalized size = 1.9 \[{\frac{{c}^{2}{x}^{3}}{3\,{e}^{2}}}+{\frac{b{x}^{2}c}{{e}^{2}}}-{\frac{{c}^{2}d{x}^{2}}{{e}^{3}}}+2\,{\frac{acx}{{e}^{2}}}+{\frac{{b}^{2}x}{{e}^{2}}}-4\,{\frac{bcdx}{{e}^{3}}}+3\,{\frac{{c}^{2}{d}^{2}x}{{e}^{4}}}+2\,{\frac{\ln \left ( ex+d \right ) ab}{{e}^{2}}}-4\,{\frac{\ln \left ( ex+d \right ) adc}{{e}^{3}}}-2\,{\frac{\ln \left ( ex+d \right ){b}^{2}d}{{e}^{3}}}+6\,{\frac{\ln \left ( ex+d \right ) bc{d}^{2}}{{e}^{4}}}-4\,{\frac{\ln \left ( ex+d \right ){c}^{2}{d}^{3}}{{e}^{5}}}-{\frac{{a}^{2}}{e \left ( ex+d \right ) }}+2\,{\frac{bda}{{e}^{2} \left ( ex+d \right ) }}-2\,{\frac{ac{d}^{2}}{{e}^{3} \left ( ex+d \right ) }}-{\frac{{b}^{2}{d}^{2}}{{e}^{3} \left ( ex+d \right ) }}+2\,{\frac{{d}^{3}bc}{{e}^{4} \left ( ex+d \right ) }}-{\frac{{c}^{2}{d}^{4}}{{e}^{5} \left ( ex+d \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c*x^2+b*x+a)^2/(e*x+d)^2,x)

[Out]

1/3*c^2*x^3/e^2+1/e^2*x^2*b*c-c^2*d*x^2/e^3+2/e^2*a*c*x+b^2*x/e^2-4/e^3*b*c*d*x+
3/e^4*c^2*d^2*x+2/e^2*ln(e*x+d)*a*b-4/e^3*ln(e*x+d)*a*d*c-2/e^3*ln(e*x+d)*b^2*d+
6/e^4*ln(e*x+d)*b*c*d^2-4/e^5*ln(e*x+d)*c^2*d^3-1/e/(e*x+d)*a^2+2/e^2/(e*x+d)*d*
a*b-2/e^3/(e*x+d)*a*c*d^2-1/e^3/(e*x+d)*b^2*d^2+2/e^4/(e*x+d)*d^3*b*c-1/e^5/(e*x
+d)*c^2*d^4

_______________________________________________________________________________________

Maxima [A]  time = 0.802628, size = 236, normalized size = 1.8 \[ -\frac{c^{2} d^{4} - 2 \, b c d^{3} e - 2 \, a b d e^{3} + a^{2} e^{4} +{\left (b^{2} + 2 \, a c\right )} d^{2} e^{2}}{e^{6} x + d e^{5}} + \frac{c^{2} e^{2} x^{3} - 3 \,{\left (c^{2} d e - b c e^{2}\right )} x^{2} + 3 \,{\left (3 \, c^{2} d^{2} - 4 \, b c d e +{\left (b^{2} + 2 \, a c\right )} e^{2}\right )} x}{3 \, e^{4}} - \frac{2 \,{\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e - a b e^{3} +{\left (b^{2} + 2 \, a c\right )} d e^{2}\right )} \log \left (e x + d\right )}{e^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2/(e*x + d)^2,x, algorithm="maxima")

[Out]

-(c^2*d^4 - 2*b*c*d^3*e - 2*a*b*d*e^3 + a^2*e^4 + (b^2 + 2*a*c)*d^2*e^2)/(e^6*x
+ d*e^5) + 1/3*(c^2*e^2*x^3 - 3*(c^2*d*e - b*c*e^2)*x^2 + 3*(3*c^2*d^2 - 4*b*c*d
*e + (b^2 + 2*a*c)*e^2)*x)/e^4 - 2*(2*c^2*d^3 - 3*b*c*d^2*e - a*b*e^3 + (b^2 + 2
*a*c)*d*e^2)*log(e*x + d)/e^5

_______________________________________________________________________________________

Fricas [A]  time = 0.213457, size = 350, normalized size = 2.67 \[ \frac{c^{2} e^{4} x^{4} - 3 \, c^{2} d^{4} + 6 \, b c d^{3} e + 6 \, a b d e^{3} - 3 \, a^{2} e^{4} - 3 \,{\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} -{\left (2 \, c^{2} d e^{3} - 3 \, b c e^{4}\right )} x^{3} + 3 \,{\left (2 \, c^{2} d^{2} e^{2} - 3 \, b c d e^{3} +{\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} + 3 \,{\left (3 \, c^{2} d^{3} e - 4 \, b c d^{2} e^{2} +{\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x - 6 \,{\left (2 \, c^{2} d^{4} - 3 \, b c d^{3} e - a b d e^{3} +{\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} +{\left (2 \, c^{2} d^{3} e - 3 \, b c d^{2} e^{2} - a b e^{4} +{\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x\right )} \log \left (e x + d\right )}{3 \,{\left (e^{6} x + d e^{5}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2/(e*x + d)^2,x, algorithm="fricas")

[Out]

1/3*(c^2*e^4*x^4 - 3*c^2*d^4 + 6*b*c*d^3*e + 6*a*b*d*e^3 - 3*a^2*e^4 - 3*(b^2 +
2*a*c)*d^2*e^2 - (2*c^2*d*e^3 - 3*b*c*e^4)*x^3 + 3*(2*c^2*d^2*e^2 - 3*b*c*d*e^3
+ (b^2 + 2*a*c)*e^4)*x^2 + 3*(3*c^2*d^3*e - 4*b*c*d^2*e^2 + (b^2 + 2*a*c)*d*e^3)
*x - 6*(2*c^2*d^4 - 3*b*c*d^3*e - a*b*d*e^3 + (b^2 + 2*a*c)*d^2*e^2 + (2*c^2*d^3
*e - 3*b*c*d^2*e^2 - a*b*e^4 + (b^2 + 2*a*c)*d*e^3)*x)*log(e*x + d))/(e^6*x + d*
e^5)

_______________________________________________________________________________________

Sympy [A]  time = 4.89274, size = 167, normalized size = 1.27 \[ \frac{c^{2} x^{3}}{3 e^{2}} - \frac{a^{2} e^{4} - 2 a b d e^{3} + 2 a c d^{2} e^{2} + b^{2} d^{2} e^{2} - 2 b c d^{3} e + c^{2} d^{4}}{d e^{5} + e^{6} x} + \frac{x^{2} \left (b c e - c^{2} d\right )}{e^{3}} + \frac{x \left (2 a c e^{2} + b^{2} e^{2} - 4 b c d e + 3 c^{2} d^{2}\right )}{e^{4}} + \frac{2 \left (b e - 2 c d\right ) \left (a e^{2} - b d e + c d^{2}\right ) \log{\left (d + e x \right )}}{e^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x**2+b*x+a)**2/(e*x+d)**2,x)

[Out]

c**2*x**3/(3*e**2) - (a**2*e**4 - 2*a*b*d*e**3 + 2*a*c*d**2*e**2 + b**2*d**2*e**
2 - 2*b*c*d**3*e + c**2*d**4)/(d*e**5 + e**6*x) + x**2*(b*c*e - c**2*d)/e**3 + x
*(2*a*c*e**2 + b**2*e**2 - 4*b*c*d*e + 3*c**2*d**2)/e**4 + 2*(b*e - 2*c*d)*(a*e*
*2 - b*d*e + c*d**2)*log(d + e*x)/e**5

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.206985, size = 336, normalized size = 2.56 \[ \frac{1}{3} \,{\left (c^{2} - \frac{3 \,{\left (2 \, c^{2} d e - b c e^{2}\right )} e^{\left (-1\right )}}{x e + d} + \frac{3 \,{\left (6 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + b^{2} e^{4} + 2 \, a c e^{4}\right )} e^{\left (-2\right )}}{{\left (x e + d\right )}^{2}}\right )}{\left (x e + d\right )}^{3} e^{\left (-5\right )} + 2 \,{\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e + b^{2} d e^{2} + 2 \, a c d e^{2} - a b e^{3}\right )} e^{\left (-5\right )}{\rm ln}\left (\frac{{\left | x e + d \right |} e^{\left (-1\right )}}{{\left (x e + d\right )}^{2}}\right ) -{\left (\frac{c^{2} d^{4} e^{3}}{x e + d} - \frac{2 \, b c d^{3} e^{4}}{x e + d} + \frac{b^{2} d^{2} e^{5}}{x e + d} + \frac{2 \, a c d^{2} e^{5}}{x e + d} - \frac{2 \, a b d e^{6}}{x e + d} + \frac{a^{2} e^{7}}{x e + d}\right )} e^{\left (-8\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2/(e*x + d)^2,x, algorithm="giac")

[Out]

1/3*(c^2 - 3*(2*c^2*d*e - b*c*e^2)*e^(-1)/(x*e + d) + 3*(6*c^2*d^2*e^2 - 6*b*c*d
*e^3 + b^2*e^4 + 2*a*c*e^4)*e^(-2)/(x*e + d)^2)*(x*e + d)^3*e^(-5) + 2*(2*c^2*d^
3 - 3*b*c*d^2*e + b^2*d*e^2 + 2*a*c*d*e^2 - a*b*e^3)*e^(-5)*ln(abs(x*e + d)*e^(-
1)/(x*e + d)^2) - (c^2*d^4*e^3/(x*e + d) - 2*b*c*d^3*e^4/(x*e + d) + b^2*d^2*e^5
/(x*e + d) + 2*a*c*d^2*e^5/(x*e + d) - 2*a*b*d*e^6/(x*e + d) + a^2*e^7/(x*e + d)
)*e^(-8)